/*
 * @Description: 自动营销接口api
 * @Author: lixianggang
 * @Date: 2022-11-17 13:55:01
 * @LastEditors: lixianggang
 * @LastEditTime: 2023-01-17 16:50:27
 */
import request from "@/utils/request";

// 查询分组列表
export function getFollowList(params) {
  return request({
    url: "/admin/follow/list",
    method: "get",
    params,
  });
}

// 查询分组列问卷个分页
export function getFollowListPage(params) {
  return request({
    url: "/admin/follow/listPage",
    method: "get",
    params,
  });
}

// 填写跟进记录
export function addFollow(data) {
  return request({
    url: "/admin/follow",
    method: "post",
    data,
  });
}

// 查询营销任务列表
export function getTaskList(params) {
  return request({
    url: "/admin/journey/config/list",
    method: "get",
    params,
  });
}

// 查询旅程列表
export function getFlowNameList(params) {
  return request({
    url: "/admin/admin/JourneyFlowInfo/flowNameList",
    method: "get",
    params,
  });
}

// 查询旅程下线索详情
export function getFlowDetailList(params) {
  return request({
    url: "/admin/journey/config/detailList",
    method: "get",
    params,
  });
}

// 查询旅程下线索详情-分页查询
export function getFlowDetailPage(params) {
  return request({
    url: "/admin/journey/config/detailPage",
    method: "get",
    params,
  });
}

// 查询旅程下所有阶段
export function getFlowNodeList(id) {
  return request({
    url: "/admin/admin/JourneyFlowNode/getFlowNodeList/" + id,
    method: "get",
  });
}

// 创建旅程任务
export function addJourneyTask(data) {
  return request({
    url: "/admin/journey/config",
    method: "post",
    data,
  });
}

// 编辑旅程任务
export function updateJourneyTask(data) {
  return request({
    url: "/admin/journey/config",
    method: "put",
    data,
  });
}

// 旅程配置重复校验接口
export function addJourneyTaskCheck(data) {
  return request({
    url: "/admin/journey/config/check",
    method: "post",
    data,
  });
}

// 查看旅程任务详情
export function queryJourneyTask(id) {
  return request({
    url: "/admin/journey/config/" + id,
    method: "get",
  });
}

// 删除旅程任务
export function deleteJourneyTask(id) {
  return request({
    url: "/admin/journey/config/" + id,
    method: "delete",
  });
}

// 我的跟进-用户旅程阶段
export function getUserJourney(params) {
  return request({
    url: "/admin/follow/dropDownBox",
    method: "get",
    params,
  });
}

// 我的跟进-用户旅程阶段
export function getFollowStatusList(params) {
  return request({
    url: "/admin/follow/followUpStatus",
    method: "get",
    params,
  });
}

// 营销数据分析查询
export function getMarketAnalysisList(data) {
  return request({
    url: "/admin/scrmMarketingDeliveryTrackMaterial/list",
    method: "post",
    data,
  });
}
